/**
 * Created by lingo on 2017/9/28.
 */
'use strict';
/**
 * logic
 * @param  {} []
 * @return {}     []
 */
export default class extends think.logic.base {
    /**
     * index action logic
     * @return {} []
     */
    indexAction() {

    }

    async registerphoneAction(){
        this.rules = {
            account: 'required'
        }
    }
    // async registerAction(){
    //    let rule = {
    //        account: require,
    //        password: require
    //    }
    //    let flag = this.validate(rule)
    //     if (!flag){
    //        this.fail('validate error',this.errors())
    //     }
    // }

    async loginAction(){
        let rules = {
            account: 'required',
            password: 'required'
        }
        let flag = this.validate(rules)
        console.log(flag)
        if (!flag) {
            this.fail('validate error', this.errors())
        }
    }
}